<?php
/**
 * Created by Alan.
 * User: Alan
 * Date: 2018\10\8 0008
 * Time: 17:00
 */

namespace app\common\model;


use think\Model;

class BisAccount extends Model
{
    protected $autoWriteTimestamp = true;
    public function add($data)
    {
        $data['status'] = 0;
        $this->save($data);
        return $this->id;
    }

    //根据id修改字段值
    public function updateById($data = [], $id = 0)
    {
        return $this->allowField(true)->save($data,['id' => $id]);
    }
}